package com.app.partner.control;

import com.app.partner.model.User;
import com.app.partner.model.enter;
import com.app.partner.service.enterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/enterController")

public class enterController {
   @Autowired
   enterService enterService;

    @RequestMapping(value="/partenterServlet",method= RequestMethod.POST)
    public enter findAll(@Validated @RequestParam(value = "username",required = false) String username , @Validated @RequestParam(value = "password",required = false) String password ) throws Exception{
        return enterService.findall(username,password);
    }

}
